//
//  HotBrandCollectionViewCell.m
//  UIHomeWork19_汽车之家找车页
//
//  Created by tusm on 16/8/10.
//  Copyright © 2016年 tusm. All rights reserved.
//

#import "HotBrandCollectionViewCell.h"
#import "HotBrandList.h"
#import "UIImageView+WebCache.h"
@interface HotBrandCollectionViewCell ()
@property (nonatomic, strong) UIImageView *imgView;
@property (nonatomic, strong) UILabel *nameLabel;
@end

@implementation HotBrandCollectionViewCell

- (void)setHotBrandList:(HotBrandList *)hotBrandList{

    _hotBrandList = hotBrandList;
    [_imgView sd_setImageWithURL:[NSURL URLWithString:_hotBrandList.img]];
    _nameLabel.text = _hotBrandList.name;

}
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:self.bounds];
    if (self) {
        _imgView = [[UIImageView alloc] init];
        [self.contentView addSubview:_imgView];
        _nameLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_nameLabel];
    }
    return self;
}


- (void)layoutSubviews{
    [super layoutSubviews];
    _imgView.frame = CGRectMake(5, 5, 55, 60);
    _nameLabel.frame = CGRectMake(5,65, 55, 30);
    _nameLabel.textAlignment = NSTextAlignmentCenter;

}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
